<script lang="ts" setup>
import { get, post, Message, loadFile } from '@/utils'
const emit = defineEmits(['update:val'])
const props = defineProps<{ val: string }>()
const id = ref(props.val)
const list = ref([])
const getList = () => {
  get({ url: '/server-base/admin/bulletin/page', data: { current: 1, size: 999 } }, ({ data }) => {
    list.value = data.records
  })
}
getList()
</script>
<template>
  <a-select
    :options="list"
    @change="emit('update:val', id)"
    :field-names="{
      label: 'title',
      value: 'id'
    }"
    placeholder="请选择"
  />
</template>
<style lang="less" scoped></style>
